using System;
using IoCBattle.Core.Infrastrustoir;
using StructureMap;

namespace IoCBattle.Lifestyle.Infratrucsion
{
    public class LifestyleSubSystem 
    {
        private readonly IContainer _ownedContainer;
        private readonly ILogger _logger;

        public LifestyleSubSystem(IContainer ownedContainer)
        {
            _ownedContainer = ownedContainer;
            _ownedContainer.Configure(c =>
                                          {
                                              c.AddRegistry(new LifestyleRegistry());
                                          });

            //...
            _logger = _ownedContainer.GetInstance<ILogger>();
        }

        public void Start()
        {
            _logger.LogError(10000);
        }
    }
}